package com.witdata.common.mapper;

import com.witdata.common.domain.dto.FollowDto;
import com.witdata.common.domain.dto.UserRoleDto;
import com.witdata.mysql.domain.entity.*;
import com.witdata.common.domain.req.RegisterRequest;
import com.witdata.common.domain.dto.UserDto;
import com.witdata.common.domain.vo.UserVo;
import com.witdata.common.domain.dto.UserInstanceDto;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface UserMapper {

    UserMapper INSTANCE = Mappers.getMapper(UserMapper.class);

    UserDto toUserDto(TUser tUser);

    List<UserDto> toUserDtoList(List<TUser> tUserList);

    TUser toTUser(RegisterRequest registerRequest);

    TUser toTUser(UserDto userDto);

    TUserRole toTUserRole(UserRoleDto userRoleDto);

    UserVo toUserVo(TUser tUser);

    List<UserVo> toUserVoList(List<TUser> tUserList);

    TUserFollow toTUserFollow(FollowDto followDto);

    TUserInstance toTUserInstance(UserInstanceDto userInstanceDto);

    List<UserInstanceDto> toUserInstanceDtoList(List<TUserInstance> tUserInstanceList);
}
